# -*- coding:utf-8 -*-

from com.mat.rpa.utils.globalConstants import GlobalConstants
from com.mat.rpa.views.workWindow.leftPanel.directiveTree import treeItem
from . import screenProtectionConstants

class ScreenProtectionSubDirectiveTree(treeItem.TreeItemWithID):
    def __init__(self, parent):
        super(ScreenProtectionSubDirectiveTree, self).__init__(parent)
        self.createScreenProtectionTreeNode()

    def createScreenProtectionTreeNode(self):
        self.nodeType = GlobalConstants.treeBranchType
        self.directiveType = "screenProtection"
        self.setText(0,"屏幕保护")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, screenProtectionConstants.ScreenProtectionConstants.wakingScreenProtectionDirective, "唤起屏幕保护")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, screenProtectionConstants.ScreenProtectionConstants.settingScreenProtectionDirective, "设置屏幕保护")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, screenProtectionConstants.ScreenProtectionConstants.clearingScreenProtectionDirective, "清空屏幕保护")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, screenProtectionConstants.ScreenProtectionConstants.closingScreenProtectionDirective, "关闭屏幕保护")